add rate limiting for mentor requests #242
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement a rate limit on mentor requests.
Added a new column to
Mentor Request
Table to indicate a start date for a cycle (one month) to track whether a user has reached a limit or not.When submitting a request, bot will check for the number of requests made within a cycle. If the limit has not been reached, it will proceed to add request record and let the user know how many requests are remaining. If not, it will notify the user the new date on which the user can start making request again.
NOTE: prod table should have a new
view
that is sorted bycreated At
value in descending order and would also need to havestart date
(name can change to one that makes more sense) which indicates the start of the cycle.This did work on PII removed table. Open to suggestion on modifying the messaging to the user or how the view or new column should be named or any other suggestions.
Fixes #176